<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        //字符串扩展
        let str = "hello.vue";
        console.log(str.startsWith("hello"))//以什么开头
        console.log(str.endsWith(".vue"))//以什么结尾
        console.log(str.includes("e"))//是否包含
        console.log(str.includes("hello"))//是否包含

        //字符串模板
        let ss = `
        <div>
            <span>hello world</span>
        </div>
        `;
        console.log(ss)

        let name = "zhangsan";
        let age = 18;
        function func() {
            return "这是一个函数";
        }
        let info = `我是${name},年龄${age + 10},我想说：${func()}`;
        console.log(info);

    </script>

</body>

</html>